import axios from "axios";

// 详情数据
export function detail(id) {
    return axios.get('detail/' + id);
}

/**
 * 评论
 * @param id        话题id
 * @param user_id   评论用户id
 * @param content   评论内容
 * @returns {Promise<AxiosResponse<any>>}
 */
export function reply(id, user_id, to_user, content) {
    return axios.post('reply/' + id, {
        user_id,
        to_user,
        content
    });
}

/**
 * 采纳评论
 * @param id
 * @returns {Promise<AxiosResponse<any>>}
 */
export function adopt(id) {
    return axios.post('adopt/' + id);
}

